<?php

Class admin_indexController Extends baseController {

	public function index() { 
		//tivi
		$tiviModel = new tivi();
		$lsttv5 = $tiviModel->getTiviByWhere('','id desc limit 0,5');
		$this->registry->template->countTv = count($tiviModel->getTiviByWhere('',''));
		$this->registry->template->lsttv5 = $lsttv5;
		
		//hoadon
		$hoadonModel = new hoadon();
		$lsthd5 = $hoadonModel->getHoaDonByWhere('','','id desc limit 0,5');
		$this->registry->template->countHD = count($hoadonModel->getHoaDonByWhere('','',''));
		$this->registry->template->lsthd5 = $lsthd5;
		
		//user
		$userModel = new user();
		$lstu5 = $userModel->getUserByWhere('','Created_Date desc limit 0,5');
		$this->registry->template->countU = count($userModel->getUserByWhere('',''));
		$this->registry->template->lstu5 = $lstu5;
		
		
		//comment
		$commentModel = new comment();
		$lstc5 = $commentModel->getCommentByWhere('','thoigian desc limit 0,5');
		$this->registry->template->countC = count($commentModel->getCommentByWhere('',''));
		$this->registry->template->lstc5 = $lstc5;
		$this->registry->template->show('admin/index');
		
	}
	
	

}

?>
